﻿using FX.CC.Andon.Entity.SystemManage;
using FX.CC.Andon.Utility.DataBase;

namespace FX.CC.Andon.Service.SystemManage
{
    public class WebSetService
    {
        private static object lockHelper = new object();

        /// <summary>
        ///  读取配置文件
        /// </summary>
        /// <param name="configFilePath"></param>
        /// <returns></returns>
        public WebSet loadConfig(string configFilePath)
        {
            return (WebSet)SerializationHelper.Load(typeof(WebSet), configFilePath);
        }

        public WebSet saveConifg(WebSet mode, string configFilePath)
        {
            lock (lockHelper)
            {
                SerializationHelper.Save(mode, configFilePath);
            }
            return mode;
        }
    }
}
